import Vue from "vue";

import ElementUI from "element-ui";
import "element-ui/lib/theme-chalk/index.css";

import App from "./App.vue";
import router from "./router";
import store from "./store";

import Router from "vue-router";
import VueRouter from "vue-router";

//  引入Echarts
import * as echarts from "echarts";
Vue.prototype.$echarts = echarts;

import axios from "axios";
Vue.prototype.$axios = axios;

Vue.use(ElementUI);
Vue.use(Router);
Vue.config.productionTip = false;

// 解决重复点击导航路由报错
const originalPush = Router.prototype.push;
Router.prototype.push = function push(location) {
  return originalPush.call(this, location).catch((err) => err);
};

new Vue({
  router,
  store,
  render: (h) => h(App),
}).$mount("#app");
